package com.acceptable.qucun.generic.util;

import org.aspectj.lang.JoinPoint;

import java.util.HashMap;
import java.util.Map;

public class AspectUtil {
    public static Map<String, Object> paramMap(JoinPoint joinPoint){
        Map<String, Object> paramMap = new HashMap<>();
        for (Object arg: joinPoint.getArgs()){
            Class paramType = arg.getClass();
            paramMap.put(paramType.getSimpleName(), arg);
        }
        return paramMap;
    }
}
